import React from 'react';
import {Navigate} from "react-router-dom";

const AuthRoute = (props:any) => {



if(localStorage.getItem("token")){
    return <>{props.children}</>
}else {
    return <Navigate to={'/login'}></Navigate>
}



};

export default AuthRoute;